import 'package:flutter/material.dart';

class StudyImage extends StatefulWidget {
  const StudyImage({super.key});

  @override
  createState() => StudyImageState();
}

class StudyImageState extends State {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("图片及ICON"),
      ),
      body: Column(
        children: [
          Column(
            children: [
              const Center(
                child: Text(
                  "从asset中加载图片",
                  textScaleFactor: 1.2,
                ),
              ),
              Image.asset(
                "images/BasicComponents.test.jpg",
                width: 100.0,
                height: 100.0,
              ),
              const Divider(),
              const Center(
                child: Text("从网络中加载图片", textScaleFactor: 1.2),
              ),
              Image.network(
                  "https://avatars2.githubusercontent.com/u/20411648?s=460&v=4",
                width: 100.0,
                height: 100.0,
              ),
              const Divider()
            ],
          )
        ],
      ),
    );
  }
}
